\section{master.\+c File Reference}
\label{master_8c}\index{master.\+c@{master.\+c}}


Ether\+C\+AT master methods.  


\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{master_8c_a751f4190b1539458133007dbf61b05f7}} 
\#define \textbf{ D\+E\+B\+U\+G\+\_\+\+I\+N\+J\+E\+CT}~0
\begin{DoxyCompactList}\small\item\em Set to 1 to enable external datagram injection debugging. \end{DoxyCompactList}\item 
\#define \textbf{ E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+S\+L\+A\+VE}
\begin{DoxyCompactList}\small\item\em Common implementation for \doxyref{ec\+\_\+master\+\_\+find\+\_\+slave()}{p.}{master_8c_a219b6e4e9e03c176c716a9f77a745c53} and \doxyref{ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const()}{p.}{master_8c_a9a4d59c5ff4563f659dbebe5ca6dc505}. \end{DoxyCompactList}\item 
\#define \textbf{ E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+C\+O\+N\+F\+IG}
\begin{DoxyCompactList}\small\item\em Common implementation for \doxyref{ec\+\_\+master\+\_\+get\+\_\+config()}{p.}{master_8c_a401f275d34a9ef5b85879e6a3d4f1507} and \doxyref{ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const()}{p.}{master_8c_ab4688a44f35279c37bf4add37c49daf9}. \end{DoxyCompactList}\item 
\#define \textbf{ E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+D\+O\+M\+A\+IN}
\begin{DoxyCompactList}\small\item\em Common implementation for \doxyref{ec\+\_\+master\+\_\+find\+\_\+domain()}{p.}{master_8c_a8d22634713ccbe95cb40767cda5375a2} and \doxyref{ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const()}{p.}{master_8c_ac767fa3488ddfc5a678d2949e40acdc4}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{master_8c_a77edb71466de18f2677fa063f55d3b09}} 
void \textbf{ ec\+\_\+master\+\_\+clear\+\_\+slave\+\_\+configs} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Clear all slave configurations. \end{DoxyCompactList}\item 
\mbox{\label{master_8c_a6e9ccf4ab2c24f500464622000981844}} 
void \textbf{ ec\+\_\+master\+\_\+clear\+\_\+domains} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Clear all domains. \end{DoxyCompactList}\item 
\mbox{\label{master_8c_a34819c03f2cc0f76b5926b0708c31af5}} 
static int \textbf{ ec\+\_\+master\+\_\+idle\+\_\+thread} (void $\ast$priv\+\_\+data)
\begin{DoxyCompactList}\small\item\em Master kernel thread function for I\+D\+LE phase. \end{DoxyCompactList}\item 
\mbox{\label{master_8c_a39fe9468a131cd1c27bbd67420e9ead2}} 
static int \textbf{ ec\+\_\+master\+\_\+operation\+\_\+thread} (void $\ast$priv\+\_\+data)
\begin{DoxyCompactList}\small\item\em Master kernel thread function for O\+P\+E\+R\+A\+T\+I\+ON phase. \end{DoxyCompactList}\item 
\mbox{\label{master_8c_a17d4a1d66e6ba537a2838cbae62fa24f}} 
static int \textbf{ ec\+\_\+master\+\_\+eoe\+\_\+thread} (void $\ast$priv\+\_\+data)
\begin{DoxyCompactList}\small\item\em Does the Ethernet over Ether\+C\+AT processing. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+find\+\_\+dc\+\_\+ref\+\_\+clock} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Finds the DC reference clock. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+clear\+\_\+device\+\_\+stats} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Clears the common device statistics. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+update\+\_\+device\+\_\+stats} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Updates the common device statistics. \end{DoxyCompactList}\item 
\mbox{\label{master_8c_a1042d68ede5c0f866dc185b89167b31f}} 
void \textbf{ ec\+\_\+master\+\_\+init\+\_\+static} (void)
\begin{DoxyCompactList}\small\item\em Static variables initializer. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+master\+\_\+init} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, unsigned int index, const uint8\+\_\+t $\ast$main\+\_\+mac, const uint8\+\_\+t $\ast$backup\+\_\+mac, dev\+\_\+t \textbf{ device\+\_\+number}, struct \textbf{ class} $\ast$\textbf{ class}, unsigned int \textbf{ debug\+\_\+level})
\begin{DoxyCompactList}\small\item\em Master constructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+clear} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+clear\+\_\+eoe\+\_\+handlers} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Clear and free all EoE handlers. \end{DoxyCompactList}\item 
\mbox{\label{master_8c_abc070614154a93395c518000cb62267d}} 
void \textbf{ ec\+\_\+master\+\_\+clear\+\_\+slaves} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Clear all slaves. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+clear\+\_\+config} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Clear the configuration applied by the application. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+internal\+\_\+send\+\_\+cb} (void $\ast$cb\+\_\+data)
\begin{DoxyCompactList}\small\item\em Internal sending callback. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+internal\+\_\+receive\+\_\+cb} (void $\ast$cb\+\_\+data)
\begin{DoxyCompactList}\small\item\em Internal receiving callback. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+master\+\_\+thread\+\_\+start} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, int($\ast$thread\+\_\+func)(void $\ast$), const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Starts the master thread. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+thread\+\_\+stop} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Stops the master thread. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+master\+\_\+enter\+\_\+idle\+\_\+phase} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Transition function from O\+R\+P\+H\+A\+N\+ED to I\+D\+LE phase. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+leave\+\_\+idle\+\_\+phase} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Transition function from I\+D\+LE to O\+R\+P\+H\+A\+N\+ED phase. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+master\+\_\+enter\+\_\+operation\+\_\+phase} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Transition function from I\+D\+LE to O\+P\+E\+R\+A\+T\+I\+ON phase. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+leave\+\_\+operation\+\_\+phase} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Transition function from O\+P\+E\+R\+A\+T\+I\+ON to I\+D\+LE phase. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+inject\+\_\+external\+\_\+datagrams} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Injects external datagrams that fit into the datagram queue. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+set\+\_\+send\+\_\+interval} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, unsigned int send\+\_\+interval)
\begin{DoxyCompactList}\small\item\em Sets the expected interval between calls to ecrt\+\_\+master\+\_\+send and calculates the maximum amount of data to queue. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$ \textbf{ ec\+\_\+master\+\_\+get\+\_\+external\+\_\+datagram} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Searches for a free datagram in the external datagram ring. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+queue\+\_\+datagram} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em Places a datagram in the datagram queue. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+queue\+\_\+datagram\+\_\+ext} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em Places a datagram in the non-\/application datagram queue. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+send\+\_\+datagrams} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, \textbf{ ec\+\_\+device\+\_\+index\+\_\+t} device\+\_\+index)
\begin{DoxyCompactList}\small\item\em Sends the datagrams in the queue for a certain device. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+receive\+\_\+datagrams} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, const uint8\+\_\+t $\ast$frame\+\_\+data, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Processes a received frame. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+output\+\_\+stats} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Output master statistics. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+exec\+\_\+slave\+\_\+fsms} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Execute slave F\+S\+Ms. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+eoe\+\_\+start} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Starts Ethernet over Ether\+C\+AT processing on demand. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+eoe\+\_\+stop} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Stops the Ethernet over Ether\+C\+AT processing. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+attach\+\_\+slave\+\_\+configs} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Attaches the slave configurations to the slaves. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+slave\+\_\+t} $\ast$ \textbf{ ec\+\_\+master\+\_\+find\+\_\+slave} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t alias, uint16\+\_\+t position)
\begin{DoxyCompactList}\small\item\em Finds a slave in the bus, given the alias and position. \end{DoxyCompactList}\item 
const \textbf{ ec\+\_\+slave\+\_\+t} $\ast$ \textbf{ ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t alias, uint16\+\_\+t position)
\begin{DoxyCompactList}\small\item\em Finds a slave in the bus, given the alias and position. \end{DoxyCompactList}\item 
unsigned int \textbf{ ec\+\_\+master\+\_\+config\+\_\+count} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Get the number of slave configurations provided by the application. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$ \textbf{ ec\+\_\+master\+\_\+get\+\_\+config} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master, unsigned int pos)
\begin{DoxyCompactList}\small\item\em Get a slave configuration via its position in the list. \end{DoxyCompactList}\item 
const \textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$ \textbf{ ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master, unsigned int pos)
\begin{DoxyCompactList}\small\item\em Get a slave configuration via its position in the list. \end{DoxyCompactList}\item 
unsigned int \textbf{ ec\+\_\+master\+\_\+domain\+\_\+count} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Get the number of domains. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+domain\+\_\+t} $\ast$ \textbf{ ec\+\_\+master\+\_\+find\+\_\+domain} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, unsigned int index)
\begin{DoxyCompactList}\small\item\em Get a domain via its position in the list. \end{DoxyCompactList}\item 
const \textbf{ ec\+\_\+domain\+\_\+t} $\ast$ \textbf{ ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master, unsigned int index)
\begin{DoxyCompactList}\small\item\em Get a domain via its position in the list. \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ ec\+\_\+master\+\_\+eoe\+\_\+handler\+\_\+count} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Get the number of EoE handlers. \end{DoxyCompactList}\item 
const \textbf{ ec\+\_\+eoe\+\_\+t} $\ast$ \textbf{ ec\+\_\+master\+\_\+get\+\_\+eoe\+\_\+handler\+\_\+const} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t index)
\begin{DoxyCompactList}\small\item\em Get an EoE handler via its position in the list. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+master\+\_\+debug\+\_\+level} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, unsigned int level)
\begin{DoxyCompactList}\small\item\em Set the debug level. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+master\+\_\+calc\+\_\+topology\+\_\+rec} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, \textbf{ ec\+\_\+slave\+\_\+t} $\ast$port0\+\_\+slave, unsigned int $\ast$slave\+\_\+position)
\begin{DoxyCompactList}\small\item\em Calculates the bus topology; recursion function. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+calc\+\_\+topology} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Calculates the bus topology. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+calc\+\_\+transmission\+\_\+delays} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Calculates the bus transmission delays. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+calc\+\_\+dc} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Distributed-\/clocks calculations. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+master\+\_\+request\+\_\+op} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Request OP state for configured slaves. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+domain\+\_\+t} $\ast$ \textbf{ ecrt\+\_\+master\+\_\+create\+\_\+domain\+\_\+err} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Same as \doxyref{ecrt\+\_\+master\+\_\+create\+\_\+domain()}{p.}{group__ApplicationInterface_gae4ede07f05b211667078ab2b2396da6e}, but with E\+R\+R\+\_\+\+P\+T\+R() return value. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+domain\+\_\+t} $\ast$ \textbf{ ecrt\+\_\+master\+\_\+create\+\_\+domain} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Creates a new process data domain. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+activate} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Finishes the configuration phase and prepares for cyclic operation. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+deactivate} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Deactivates the master. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+send} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Sends all datagrams in the queue. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+receive} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Fetches received frames from the hardware and processes the datagrams. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+send\+\_\+ext} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Sends non-\/application datagrams. \end{DoxyCompactList}\item 
\mbox{\label{master_8c_ab85113663dfc43d6b39e684859f948cc}} 
\textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$ \textbf{ ecrt\+\_\+master\+\_\+slave\+\_\+config\+\_\+err} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t alias, uint16\+\_\+t position, uint32\+\_\+t vendor\+\_\+id, uint32\+\_\+t product\+\_\+code)
\begin{DoxyCompactList}\small\item\em Same as \doxyref{ecrt\+\_\+master\+\_\+slave\+\_\+config()}{p.}{group__ApplicationInterface_gaa190a5d3aa2a72b8950ef93aa7baab0b}, but with E\+R\+R\+\_\+\+P\+T\+R() return value. \end{DoxyCompactList}\item 
\textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$ \textbf{ ecrt\+\_\+master\+\_\+slave\+\_\+config} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t alias, uint16\+\_\+t position, uint32\+\_\+t vendor\+\_\+id, uint32\+\_\+t product\+\_\+code)
\begin{DoxyCompactList}\small\item\em Obtains a slave configuration. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+select\+\_\+reference\+\_\+clock} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, \textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$sc)
\begin{DoxyCompactList}\small\item\em Selects the reference clock for distributed clocks. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, \textbf{ ec\+\_\+master\+\_\+info\+\_\+t} $\ast$master\+\_\+info)
\begin{DoxyCompactList}\small\item\em Obtains master information. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+get\+\_\+slave} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t slave\+\_\+position, \textbf{ ec\+\_\+slave\+\_\+info\+\_\+t} $\ast$slave\+\_\+info)
\begin{DoxyCompactList}\small\item\em Obtains slave information. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+callbacks} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, void($\ast$send\+\_\+cb)(void $\ast$), void($\ast$receive\+\_\+cb)(void $\ast$), void $\ast$cb\+\_\+data)
\begin{DoxyCompactList}\small\item\em Sets the locking callbacks. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+state} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master, \textbf{ ec\+\_\+master\+\_\+state\+\_\+t} $\ast$state)
\begin{DoxyCompactList}\small\item\em Reads the current master state. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+link\+\_\+state} (const \textbf{ ec\+\_\+master\+\_\+t} $\ast$master, unsigned int dev\+\_\+idx, \textbf{ ec\+\_\+master\+\_\+link\+\_\+state\+\_\+t} $\ast$state)
\begin{DoxyCompactList}\small\item\em Reads the current state of a redundant link. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+application\+\_\+time} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint64\+\_\+t app\+\_\+time)
\begin{DoxyCompactList}\small\item\em Sets the application time. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+reference\+\_\+clock\+\_\+time} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint32\+\_\+t $\ast$time)
\begin{DoxyCompactList}\small\item\em Get the lower 32 bit of the reference clock system time. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+sync\+\_\+reference\+\_\+clock} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Queues the DC reference clock drift compensation datagram for sending. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+sync\+\_\+slave\+\_\+clocks} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Queues the DC clock drift compensation datagram for sending. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+sync\+\_\+monitor\+\_\+queue} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Queues the DC synchrony monitoring datagram for sending. \end{DoxyCompactList}\item 
uint32\+\_\+t \textbf{ ecrt\+\_\+master\+\_\+sync\+\_\+monitor\+\_\+process} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Processes the DC synchrony monitoring datagram. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+sdo\+\_\+download} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t slave\+\_\+position, uint16\+\_\+t index, uint8\+\_\+t subindex, uint8\+\_\+t $\ast$data, size\+\_\+t data\+\_\+size, uint32\+\_\+t $\ast$abort\+\_\+code)
\begin{DoxyCompactList}\small\item\em Executes an S\+DO download request to write data to a slave. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+sdo\+\_\+download\+\_\+complete} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t slave\+\_\+position, uint16\+\_\+t index, uint8\+\_\+t $\ast$data, size\+\_\+t data\+\_\+size, uint32\+\_\+t $\ast$abort\+\_\+code)
\begin{DoxyCompactList}\small\item\em Executes an S\+DO download request to write data to a slave via complete access. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+sdo\+\_\+upload} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t slave\+\_\+position, uint16\+\_\+t index, uint8\+\_\+t subindex, uint8\+\_\+t $\ast$target, size\+\_\+t target\+\_\+size, size\+\_\+t $\ast$result\+\_\+size, uint32\+\_\+t $\ast$abort\+\_\+code)
\begin{DoxyCompactList}\small\item\em Executes an S\+DO upload request to read data from a slave. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+write\+\_\+idn} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t slave\+\_\+position, uint8\+\_\+t drive\+\_\+no, uint16\+\_\+t idn, uint8\+\_\+t $\ast$data, size\+\_\+t data\+\_\+size, uint16\+\_\+t $\ast$error\+\_\+code)
\begin{DoxyCompactList}\small\item\em Executes an SoE write request. \end{DoxyCompactList}\item 
int \textbf{ ecrt\+\_\+master\+\_\+read\+\_\+idn} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master, uint16\+\_\+t slave\+\_\+position, uint8\+\_\+t drive\+\_\+no, uint16\+\_\+t idn, uint8\+\_\+t $\ast$target, size\+\_\+t target\+\_\+size, size\+\_\+t $\ast$result\+\_\+size, uint16\+\_\+t $\ast$error\+\_\+code)
\begin{DoxyCompactList}\small\item\em Executes an SoE read request. \end{DoxyCompactList}\item 
void \textbf{ ecrt\+\_\+master\+\_\+reset} (\textbf{ ec\+\_\+master\+\_\+t} $\ast$master)
\begin{DoxyCompactList}\small\item\em Retry configuring slaves. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{master_8c_affc822534c2a4949d3a121af03f547fe}} 
static unsigned long \textbf{ timeout\+\_\+jiffies}
\begin{DoxyCompactList}\small\item\em Frame timeout in jiffies. \end{DoxyCompactList}\item 
\mbox{\label{master_8c_adf671d05fb17a5f646a163f174177873}} 
static unsigned long \textbf{ ext\+\_\+injection\+\_\+timeout\+\_\+jiffies}
\begin{DoxyCompactList}\small\item\em Timeout for external datagram injection [jiffies]. \end{DoxyCompactList}\item 
const unsigned int \textbf{ rate\+\_\+intervals} [$\,$]
\begin{DoxyCompactList}\small\item\em List of intervals for statistics [s]. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ether\+C\+AT master methods. 



\subsection{Macro Definition Documentation}
\mbox{\label{master_8c_ac767bf3e8f388127d3acdf822a7bbe50}} 
\index{master.\+c@{master.\+c}!E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+S\+L\+A\+VE@{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+S\+L\+A\+VE}}
\index{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+S\+L\+A\+VE@{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+S\+L\+A\+VE}!master.\+c@{master.\+c}}
\subsubsection{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+S\+L\+A\+VE}
{\footnotesize\ttfamily \#define E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+S\+L\+A\+VE}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{ \(\backslash\)
        if (alias) \{ \(\backslash\)
            for (; slave < master->slaves + master->slave\_count; \(\backslash\)
                    slave++) \{ \(\backslash\)
                if (slave->effective\_alias == alias) \(\backslash\)
                break; \(\backslash\)
            \} \(\backslash\)
            if (slave == master->slaves + master->slave\_count) \(\backslash\)
            return NULL; \(\backslash\)
        \} \(\backslash\)
        \(\backslash\)
        slave += position; \(\backslash\)
        if (slave < master->slaves + master->slave\_count) \{ \(\backslash\)
            return slave; \(\backslash\)
        \} \textcolor{keywordflow}{else} \{ \(\backslash\)
            return NULL; \(\backslash\)
        \} \(\backslash\)
    \} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}


Common implementation for \doxyref{ec\+\_\+master\+\_\+find\+\_\+slave()}{p.}{master_8c_a219b6e4e9e03c176c716a9f77a745c53} and \doxyref{ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const()}{p.}{master_8c_a9a4d59c5ff4563f659dbebe5ca6dc505}. 



Definition at line 1767 of file master.\+c.

\mbox{\label{master_8c_ae5318cdfa66be853bd7c04b9ebe445f3}} 
\index{master.\+c@{master.\+c}!E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+C\+O\+N\+F\+IG@{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+C\+O\+N\+F\+IG}}
\index{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+C\+O\+N\+F\+IG@{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+C\+O\+N\+F\+IG}!master.\+c@{master.\+c}}
\subsubsection{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+C\+O\+N\+F\+IG}
{\footnotesize\ttfamily \#define E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+C\+O\+N\+F\+IG}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{ \(\backslash\)
        list\_for\_each\_entry(sc, &master->configs, list) \{ \(\backslash\)
            if (pos--) \(\backslash\)
                continue; \(\backslash\)
            return sc; \(\backslash\)
        \} \(\backslash\)
        return NULL; \(\backslash\)
    \} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}


Common implementation for \doxyref{ec\+\_\+master\+\_\+get\+\_\+config()}{p.}{master_8c_a401f275d34a9ef5b85879e6a3d4f1507} and \doxyref{ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const()}{p.}{master_8c_ab4688a44f35279c37bf4add37c49daf9}. 



Definition at line 1842 of file master.\+c.

\mbox{\label{master_8c_ac9f5576287074fe04d844bf8541a1648}} 
\index{master.\+c@{master.\+c}!E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+D\+O\+M\+A\+IN@{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+D\+O\+M\+A\+IN}}
\index{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+D\+O\+M\+A\+IN@{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+D\+O\+M\+A\+IN}!master.\+c@{master.\+c}}
\subsubsection{E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+D\+O\+M\+A\+IN}
{\footnotesize\ttfamily \#define E\+C\+\_\+\+F\+I\+N\+D\+\_\+\+D\+O\+M\+A\+IN}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{ \(\backslash\)
        list\_for\_each\_entry(domain, &master->domains, list) \{ \(\backslash\)
            if (index--) \(\backslash\)
                continue; \(\backslash\)
            return domain; \(\backslash\)
        \} \(\backslash\)
        \(\backslash\)
        return NULL; \(\backslash\)
    \} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}


Common implementation for \doxyref{ec\+\_\+master\+\_\+find\+\_\+domain()}{p.}{master_8c_a8d22634713ccbe95cb40767cda5375a2} and \doxyref{ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const()}{p.}{master_8c_ac767fa3488ddfc5a678d2949e40acdc4}. 



Definition at line 1905 of file master.\+c.



\subsection{Function Documentation}
\mbox{\label{master_8c_a46e3a01cc6b9385c1f18a44dd16bb47b}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+find\+\_\+dc\+\_\+ref\+\_\+clock@{ec\+\_\+master\+\_\+find\+\_\+dc\+\_\+ref\+\_\+clock}}
\index{ec\+\_\+master\+\_\+find\+\_\+dc\+\_\+ref\+\_\+clock@{ec\+\_\+master\+\_\+find\+\_\+dc\+\_\+ref\+\_\+clock}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+find\+\_\+dc\+\_\+ref\+\_\+clock()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+find\+\_\+dc\+\_\+ref\+\_\+clock (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Finds the DC reference clock. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 2022 of file master.\+c.

\mbox{\label{master_8c_ac7bf56162a722865aad0fbbd09213ac7}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+clear\+\_\+device\+\_\+stats@{ec\+\_\+master\+\_\+clear\+\_\+device\+\_\+stats}}
\index{ec\+\_\+master\+\_\+clear\+\_\+device\+\_\+stats@{ec\+\_\+master\+\_\+clear\+\_\+device\+\_\+stats}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+clear\+\_\+device\+\_\+stats()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+clear\+\_\+device\+\_\+stats (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Clears the common device statistics. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 1265 of file master.\+c.

\mbox{\label{master_8c_a0d2ce490ddb53cdaa8b555a957a21666}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+update\+\_\+device\+\_\+stats@{ec\+\_\+master\+\_\+update\+\_\+device\+\_\+stats}}
\index{ec\+\_\+master\+\_\+update\+\_\+device\+\_\+stats@{ec\+\_\+master\+\_\+update\+\_\+device\+\_\+stats}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+update\+\_\+device\+\_\+stats()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+update\+\_\+device\+\_\+stats (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Updates the common device statistics. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 1293 of file master.\+c.

\mbox{\label{master_8c_a67209c37a6cbcb6e0db918e85dc74159}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+init@{ec\+\_\+master\+\_\+init}}
\index{ec\+\_\+master\+\_\+init@{ec\+\_\+master\+\_\+init}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+init()}
{\footnotesize\ttfamily int ec\+\_\+master\+\_\+init (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{unsigned int}]{index,  }\item[{const uint8\+\_\+t $\ast$}]{main\+\_\+mac,  }\item[{const uint8\+\_\+t $\ast$}]{backup\+\_\+mac,  }\item[{dev\+\_\+t}]{device\+\_\+number,  }\item[{struct \textbf{ class} $\ast$}]{class,  }\item[{unsigned int}]{debug\+\_\+level }\end{DoxyParamCaption})}



Master constructor. 

\begin{DoxyReturn}{Returns}
0 in case of success, else $<$ 0 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
{\em index} & master index \\
\hline
{\em main\+\_\+mac} & M\+AC address of main device \\
\hline
{\em backup\+\_\+mac} & M\+AC address of backup device \\
\hline
{\em device\+\_\+number} & Character device number. \\
\hline
{\em class} & Device class. \\
\hline
{\em debug\+\_\+level} & Debug level (module parameter). \\
\hline
\end{DoxyParams}


Definition at line 129 of file master.\+c.

\mbox{\label{master_8c_abe60d9fca60eab2dcb0654337caa338e}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+clear@{ec\+\_\+master\+\_\+clear}}
\index{ec\+\_\+master\+\_\+clear@{ec\+\_\+master\+\_\+clear}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+clear()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+clear (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Destructor. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 380 of file master.\+c.

\mbox{\label{master_8c_aba1142e8379ff8c46c773b718ccc427d}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+clear\+\_\+eoe\+\_\+handlers@{ec\+\_\+master\+\_\+clear\+\_\+eoe\+\_\+handlers}}
\index{ec\+\_\+master\+\_\+clear\+\_\+eoe\+\_\+handlers@{ec\+\_\+master\+\_\+clear\+\_\+eoe\+\_\+handlers}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+clear\+\_\+eoe\+\_\+handlers()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+clear\+\_\+eoe\+\_\+handlers (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Clear and free all EoE handlers. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 427 of file master.\+c.

\mbox{\label{master_8c_ac628f5e9972d30a808ca4fa704be01db}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+clear\+\_\+config@{ec\+\_\+master\+\_\+clear\+\_\+config}}
\index{ec\+\_\+master\+\_\+clear\+\_\+config@{ec\+\_\+master\+\_\+clear\+\_\+config}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+clear\+\_\+config()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+clear\+\_\+config (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Clear the configuration applied by the application. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 520 of file master.\+c.

\mbox{\label{master_8c_ac32d5757e56de259d18bdea5530eefe6}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+internal\+\_\+send\+\_\+cb@{ec\+\_\+master\+\_\+internal\+\_\+send\+\_\+cb}}
\index{ec\+\_\+master\+\_\+internal\+\_\+send\+\_\+cb@{ec\+\_\+master\+\_\+internal\+\_\+send\+\_\+cb}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+internal\+\_\+send\+\_\+cb()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+internal\+\_\+send\+\_\+cb (\begin{DoxyParamCaption}\item[{void $\ast$}]{cb\+\_\+data }\end{DoxyParamCaption})}



Internal sending callback. 


\begin{DoxyParams}{Parameters}
{\em cb\+\_\+data} & Callback data. \\
\hline
\end{DoxyParams}


Definition at line 534 of file master.\+c.

\mbox{\label{master_8c_afb9546182be85789ea86c822ffbfbb58}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+internal\+\_\+receive\+\_\+cb@{ec\+\_\+master\+\_\+internal\+\_\+receive\+\_\+cb}}
\index{ec\+\_\+master\+\_\+internal\+\_\+receive\+\_\+cb@{ec\+\_\+master\+\_\+internal\+\_\+receive\+\_\+cb}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+internal\+\_\+receive\+\_\+cb()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+internal\+\_\+receive\+\_\+cb (\begin{DoxyParamCaption}\item[{void $\ast$}]{cb\+\_\+data }\end{DoxyParamCaption})}



Internal receiving callback. 


\begin{DoxyParams}{Parameters}
{\em cb\+\_\+data} & Callback data. \\
\hline
\end{DoxyParams}


Definition at line 548 of file master.\+c.

\mbox{\label{master_8c_a145bcb37a6bd22d01708c905a931f891}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+thread\+\_\+start@{ec\+\_\+master\+\_\+thread\+\_\+start}}
\index{ec\+\_\+master\+\_\+thread\+\_\+start@{ec\+\_\+master\+\_\+thread\+\_\+start}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+thread\+\_\+start()}
{\footnotesize\ttfamily int ec\+\_\+master\+\_\+thread\+\_\+start (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{int($\ast$)(void $\ast$)}]{thread\+\_\+func,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Starts the master thread. 


\begin{DoxyRetVals}{Return values}
{\em 0} & Success. \\
\hline
{\em $<$0} & Error code. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
{\em thread\+\_\+func} & thread function to start \\
\hline
{\em name} & Thread name. \\
\hline
\end{DoxyParams}


Definition at line 565 of file master.\+c.

\mbox{\label{master_8c_afeb7a50f8ddf5da026a29fa6a0a0ad5e}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+thread\+\_\+stop@{ec\+\_\+master\+\_\+thread\+\_\+stop}}
\index{ec\+\_\+master\+\_\+thread\+\_\+stop@{ec\+\_\+master\+\_\+thread\+\_\+stop}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+thread\+\_\+stop()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+thread\+\_\+stop (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Stops the master thread. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 588 of file master.\+c.

\mbox{\label{master_8c_a953107732b8b44631afcb3d2f82964a0}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+enter\+\_\+idle\+\_\+phase@{ec\+\_\+master\+\_\+enter\+\_\+idle\+\_\+phase}}
\index{ec\+\_\+master\+\_\+enter\+\_\+idle\+\_\+phase@{ec\+\_\+master\+\_\+enter\+\_\+idle\+\_\+phase}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+enter\+\_\+idle\+\_\+phase()}
{\footnotesize\ttfamily int ec\+\_\+master\+\_\+enter\+\_\+idle\+\_\+phase (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Transition function from O\+R\+P\+H\+A\+N\+ED to I\+D\+LE phase. 

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 620 of file master.\+c.

\mbox{\label{master_8c_a064c1933a370bf502e0bf42e15ae45f9}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+leave\+\_\+idle\+\_\+phase@{ec\+\_\+master\+\_\+leave\+\_\+idle\+\_\+phase}}
\index{ec\+\_\+master\+\_\+leave\+\_\+idle\+\_\+phase@{ec\+\_\+master\+\_\+leave\+\_\+idle\+\_\+phase}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+leave\+\_\+idle\+\_\+phase()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+leave\+\_\+idle\+\_\+phase (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Transition function from I\+D\+LE to O\+R\+P\+H\+A\+N\+ED phase. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 653 of file master.\+c.

\mbox{\label{master_8c_a3fce542facf1fd0cee605b15b9a9e890}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+enter\+\_\+operation\+\_\+phase@{ec\+\_\+master\+\_\+enter\+\_\+operation\+\_\+phase}}
\index{ec\+\_\+master\+\_\+enter\+\_\+operation\+\_\+phase@{ec\+\_\+master\+\_\+enter\+\_\+operation\+\_\+phase}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+enter\+\_\+operation\+\_\+phase()}
{\footnotesize\ttfamily int ec\+\_\+master\+\_\+enter\+\_\+operation\+\_\+phase (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Transition function from I\+D\+LE to O\+P\+E\+R\+A\+T\+I\+ON phase. 

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 677 of file master.\+c.

\mbox{\label{master_8c_ae7481d16bd218ab84f395a0382b4de64}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+leave\+\_\+operation\+\_\+phase@{ec\+\_\+master\+\_\+leave\+\_\+operation\+\_\+phase}}
\index{ec\+\_\+master\+\_\+leave\+\_\+operation\+\_\+phase@{ec\+\_\+master\+\_\+leave\+\_\+operation\+\_\+phase}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+leave\+\_\+operation\+\_\+phase()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+leave\+\_\+operation\+\_\+phase (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Transition function from O\+P\+E\+R\+A\+T\+I\+ON to I\+D\+LE phase. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 759 of file master.\+c.

\mbox{\label{master_8c_a832eb2e0abbe7a75055672a08175a2f4}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+inject\+\_\+external\+\_\+datagrams@{ec\+\_\+master\+\_\+inject\+\_\+external\+\_\+datagrams}}
\index{ec\+\_\+master\+\_\+inject\+\_\+external\+\_\+datagrams@{ec\+\_\+master\+\_\+inject\+\_\+external\+\_\+datagrams}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+inject\+\_\+external\+\_\+datagrams()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+inject\+\_\+external\+\_\+datagrams (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Injects external datagrams that fit into the datagram queue. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 781 of file master.\+c.

\mbox{\label{master_8c_a325dee2c1fc8729911c9dc9b4c9c35a3}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+set\+\_\+send\+\_\+interval@{ec\+\_\+master\+\_\+set\+\_\+send\+\_\+interval}}
\index{ec\+\_\+master\+\_\+set\+\_\+send\+\_\+interval@{ec\+\_\+master\+\_\+set\+\_\+send\+\_\+interval}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+set\+\_\+send\+\_\+interval()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+set\+\_\+send\+\_\+interval (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{unsigned int}]{send\+\_\+interval }\end{DoxyParamCaption})}



Sets the expected interval between calls to ecrt\+\_\+master\+\_\+send and calculates the maximum amount of data to queue. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
{\em send\+\_\+interval} & Send interval \\
\hline
\end{DoxyParams}


Definition at line 890 of file master.\+c.

\mbox{\label{master_8c_a176aa87adf1dc845b1cdc2f1becb3172}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+get\+\_\+external\+\_\+datagram@{ec\+\_\+master\+\_\+get\+\_\+external\+\_\+datagram}}
\index{ec\+\_\+master\+\_\+get\+\_\+external\+\_\+datagram@{ec\+\_\+master\+\_\+get\+\_\+external\+\_\+datagram}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+get\+\_\+external\+\_\+datagram()}
{\footnotesize\ttfamily \textbf{ ec\+\_\+datagram\+\_\+t}$\ast$ ec\+\_\+master\+\_\+get\+\_\+external\+\_\+datagram (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Searches for a free datagram in the external datagram ring. 

\begin{DoxyReturn}{Returns}
Next free datagram, or N\+U\+LL. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 907 of file master.\+c.

\mbox{\label{master_8c_a4f08b9fccbb8528e7cdff3ab096d1a2e}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+queue\+\_\+datagram@{ec\+\_\+master\+\_\+queue\+\_\+datagram}}
\index{ec\+\_\+master\+\_\+queue\+\_\+datagram@{ec\+\_\+master\+\_\+queue\+\_\+datagram}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+queue\+\_\+datagram()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+queue\+\_\+datagram (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



Places a datagram in the datagram queue. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
{\em datagram} & datagram \\
\hline
\end{DoxyParams}


Definition at line 926 of file master.\+c.

\mbox{\label{master_8c_a4ee969becffc63a8ea23b40fcfad75e9}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+queue\+\_\+datagram\+\_\+ext@{ec\+\_\+master\+\_\+queue\+\_\+datagram\+\_\+ext}}
\index{ec\+\_\+master\+\_\+queue\+\_\+datagram\+\_\+ext@{ec\+\_\+master\+\_\+queue\+\_\+datagram\+\_\+ext}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+queue\+\_\+datagram\+\_\+ext()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+queue\+\_\+datagram\+\_\+ext (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



Places a datagram in the non-\/application datagram queue. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
{\em datagram} & datagram \\
\hline
\end{DoxyParams}


Definition at line 957 of file master.\+c.

\mbox{\label{master_8c_ac505facdaf5fc54a3b20be8d4ec27747}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+send\+\_\+datagrams@{ec\+\_\+master\+\_\+send\+\_\+datagrams}}
\index{ec\+\_\+master\+\_\+send\+\_\+datagrams@{ec\+\_\+master\+\_\+send\+\_\+datagrams}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+send\+\_\+datagrams()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+send\+\_\+datagrams (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{\textbf{ ec\+\_\+device\+\_\+index\+\_\+t}}]{device\+\_\+index }\end{DoxyParamCaption})}



Sends the datagrams in the queue for a certain device. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
{\em device\+\_\+index} & Device index. \\
\hline
\end{DoxyParams}


Definition at line 972 of file master.\+c.

\mbox{\label{master_8c_a64c31b83d02d9d7b92ee78396115d352}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+receive\+\_\+datagrams@{ec\+\_\+master\+\_\+receive\+\_\+datagrams}}
\index{ec\+\_\+master\+\_\+receive\+\_\+datagrams@{ec\+\_\+master\+\_\+receive\+\_\+datagrams}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+receive\+\_\+datagrams()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+receive\+\_\+datagrams (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{const uint8\+\_\+t $\ast$}]{frame\+\_\+data,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Processes a received frame. 

This function is called by the network driver for every received frame.

\begin{DoxyReturn}{Returns}
0 in case of success, else $<$ 0 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
{\em frame\+\_\+data} & frame data \\
\hline
{\em size} & size of the received data \\
\hline
\end{DoxyParams}


Definition at line 1109 of file master.\+c.

\mbox{\label{master_8c_ac54b1ad537b965a8c8b30853aae4f299}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+output\+\_\+stats@{ec\+\_\+master\+\_\+output\+\_\+stats}}
\index{ec\+\_\+master\+\_\+output\+\_\+stats@{ec\+\_\+master\+\_\+output\+\_\+stats}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+output\+\_\+stats()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+output\+\_\+stats (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Output master statistics. 

This function outputs statistical data on demand, but not more often than necessary. The output happens at most once a second. 
\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 1235 of file master.\+c.

\mbox{\label{master_8c_a2532297f68368abd6ebe4f7ca4ecb118}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+exec\+\_\+slave\+\_\+fsms@{ec\+\_\+master\+\_\+exec\+\_\+slave\+\_\+fsms}}
\index{ec\+\_\+master\+\_\+exec\+\_\+slave\+\_\+fsms@{ec\+\_\+master\+\_\+exec\+\_\+slave\+\_\+fsms}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+exec\+\_\+slave\+\_\+fsms()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+exec\+\_\+slave\+\_\+fsms (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Execute slave F\+S\+Ms. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 1420 of file master.\+c.

\mbox{\label{master_8c_a6990c94548e6bae3046fce058290568a}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+eoe\+\_\+start@{ec\+\_\+master\+\_\+eoe\+\_\+start}}
\index{ec\+\_\+master\+\_\+eoe\+\_\+start@{ec\+\_\+master\+\_\+eoe\+\_\+start}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+eoe\+\_\+start()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+eoe\+\_\+start (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Starts Ethernet over Ether\+C\+AT processing on demand. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 1635 of file master.\+c.

\mbox{\label{master_8c_ac6bc3661b0ddb2397967861e7b260143}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+eoe\+\_\+stop@{ec\+\_\+master\+\_\+eoe\+\_\+stop}}
\index{ec\+\_\+master\+\_\+eoe\+\_\+stop@{ec\+\_\+master\+\_\+eoe\+\_\+stop}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+eoe\+\_\+stop()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+eoe\+\_\+stop (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Stops the Ethernet over Ether\+C\+AT processing. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master \\
\hline
\end{DoxyParams}


Definition at line 1672 of file master.\+c.

\mbox{\label{master_8c_aabba4d8b5b431401a0b851dca5387a03}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+attach\+\_\+slave\+\_\+configs@{ec\+\_\+master\+\_\+attach\+\_\+slave\+\_\+configs}}
\index{ec\+\_\+master\+\_\+attach\+\_\+slave\+\_\+configs@{ec\+\_\+master\+\_\+attach\+\_\+slave\+\_\+configs}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+attach\+\_\+slave\+\_\+configs()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+attach\+\_\+slave\+\_\+configs (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Attaches the slave configurations to the slaves. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 1751 of file master.\+c.

\mbox{\label{master_8c_a219b6e4e9e03c176c716a9f77a745c53}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+find\+\_\+slave@{ec\+\_\+master\+\_\+find\+\_\+slave}}
\index{ec\+\_\+master\+\_\+find\+\_\+slave@{ec\+\_\+master\+\_\+find\+\_\+slave}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+find\+\_\+slave()}
{\footnotesize\ttfamily \textbf{ ec\+\_\+slave\+\_\+t}$\ast$ ec\+\_\+master\+\_\+find\+\_\+slave (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{uint16\+\_\+t}]{alias,  }\item[{uint16\+\_\+t}]{position }\end{DoxyParamCaption})}



Finds a slave in the bus, given the alias and position. 

\begin{DoxyReturn}{Returns}
Search result, or N\+U\+LL. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em alias} & Slave alias. \\
\hline
{\em position} & Slave position. \\
\hline
\end{DoxyParams}


Definition at line 1791 of file master.\+c.

\mbox{\label{master_8c_a9a4d59c5ff4563f659dbebe5ca6dc505}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const@{ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const}}
\index{ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const@{ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const()}
{\footnotesize\ttfamily const \textbf{ ec\+\_\+slave\+\_\+t}$\ast$ ec\+\_\+master\+\_\+find\+\_\+slave\+\_\+const (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{uint16\+\_\+t}]{alias,  }\item[{uint16\+\_\+t}]{position }\end{DoxyParamCaption})}



Finds a slave in the bus, given the alias and position. 

Const version.

\begin{DoxyReturn}{Returns}
Search result, or N\+U\+LL. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em alias} & Slave alias. \\
\hline
{\em position} & Slave position. \\
\hline
\end{DoxyParams}


Definition at line 1807 of file master.\+c.

\mbox{\label{master_8c_abed3c7080b03023e5dd744f7ffe400b3}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+config\+\_\+count@{ec\+\_\+master\+\_\+config\+\_\+count}}
\index{ec\+\_\+master\+\_\+config\+\_\+count@{ec\+\_\+master\+\_\+config\+\_\+count}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+config\+\_\+count()}
{\footnotesize\ttfamily unsigned int ec\+\_\+master\+\_\+config\+\_\+count (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Get the number of slave configurations provided by the application. 

\begin{DoxyReturn}{Returns}
Number of configurations. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 1823 of file master.\+c.

\mbox{\label{master_8c_a401f275d34a9ef5b85879e6a3d4f1507}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+get\+\_\+config@{ec\+\_\+master\+\_\+get\+\_\+config}}
\index{ec\+\_\+master\+\_\+get\+\_\+config@{ec\+\_\+master\+\_\+get\+\_\+config}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+get\+\_\+config()}
{\footnotesize\ttfamily \textbf{ ec\+\_\+slave\+\_\+config\+\_\+t}$\ast$ ec\+\_\+master\+\_\+get\+\_\+config (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{unsigned int}]{pos }\end{DoxyParamCaption})}



Get a slave configuration via its position in the list. 

\begin{DoxyReturn}{Returns}
Slave configuration or {\itshape N\+U\+LL}. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em pos} & List position. \\
\hline
\end{DoxyParams}


Definition at line 1856 of file master.\+c.

\mbox{\label{master_8c_ab4688a44f35279c37bf4add37c49daf9}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const@{ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const}}
\index{ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const@{ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const()}
{\footnotesize\ttfamily const \textbf{ ec\+\_\+slave\+\_\+config\+\_\+t}$\ast$ ec\+\_\+master\+\_\+get\+\_\+config\+\_\+const (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{unsigned int}]{pos }\end{DoxyParamCaption})}



Get a slave configuration via its position in the list. 

Const version.

\begin{DoxyReturn}{Returns}
Slave configuration or {\itshape N\+U\+LL}. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em pos} & List position. \\
\hline
\end{DoxyParams}


Definition at line 1871 of file master.\+c.

\mbox{\label{master_8c_aec56a429afe6e1833d36cb90870329fd}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+domain\+\_\+count@{ec\+\_\+master\+\_\+domain\+\_\+count}}
\index{ec\+\_\+master\+\_\+domain\+\_\+count@{ec\+\_\+master\+\_\+domain\+\_\+count}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+domain\+\_\+count()}
{\footnotesize\ttfamily unsigned int ec\+\_\+master\+\_\+domain\+\_\+count (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Get the number of domains. 

\begin{DoxyReturn}{Returns}
Number of domains. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 1886 of file master.\+c.

\mbox{\label{master_8c_a8d22634713ccbe95cb40767cda5375a2}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+find\+\_\+domain@{ec\+\_\+master\+\_\+find\+\_\+domain}}
\index{ec\+\_\+master\+\_\+find\+\_\+domain@{ec\+\_\+master\+\_\+find\+\_\+domain}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+find\+\_\+domain()}
{\footnotesize\ttfamily \textbf{ ec\+\_\+domain\+\_\+t}$\ast$ ec\+\_\+master\+\_\+find\+\_\+domain (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{unsigned int}]{index }\end{DoxyParamCaption})}



Get a domain via its position in the list. 

\begin{DoxyReturn}{Returns}
Domain pointer, or {\itshape N\+U\+LL} if not found. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em index} & Domain index. \\
\hline
\end{DoxyParams}


Definition at line 1920 of file master.\+c.

\mbox{\label{master_8c_ac767fa3488ddfc5a678d2949e40acdc4}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const@{ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const}}
\index{ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const@{ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const()}
{\footnotesize\ttfamily const \textbf{ ec\+\_\+domain\+\_\+t}$\ast$ ec\+\_\+master\+\_\+find\+\_\+domain\+\_\+const (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{unsigned int}]{index }\end{DoxyParamCaption})}



Get a domain via its position in the list. 

Const version.

\begin{DoxyReturn}{Returns}
Domain pointer, or {\itshape N\+U\+LL} if not found. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em index} & Domain index. \\
\hline
\end{DoxyParams}


Definition at line 1935 of file master.\+c.

\mbox{\label{master_8c_a1fcf7d0815f5e4bf041fd083857cd7b4}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+eoe\+\_\+handler\+\_\+count@{ec\+\_\+master\+\_\+eoe\+\_\+handler\+\_\+count}}
\index{ec\+\_\+master\+\_\+eoe\+\_\+handler\+\_\+count@{ec\+\_\+master\+\_\+eoe\+\_\+handler\+\_\+count}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+eoe\+\_\+handler\+\_\+count()}
{\footnotesize\ttfamily uint16\+\_\+t ec\+\_\+master\+\_\+eoe\+\_\+handler\+\_\+count (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Get the number of EoE handlers. 

\begin{DoxyReturn}{Returns}
Number of EoE handlers. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 1952 of file master.\+c.

\mbox{\label{master_8c_a8ee4d7fd000942ce4ca9d2072a924d08}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+get\+\_\+eoe\+\_\+handler\+\_\+const@{ec\+\_\+master\+\_\+get\+\_\+eoe\+\_\+handler\+\_\+const}}
\index{ec\+\_\+master\+\_\+get\+\_\+eoe\+\_\+handler\+\_\+const@{ec\+\_\+master\+\_\+get\+\_\+eoe\+\_\+handler\+\_\+const}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+get\+\_\+eoe\+\_\+handler\+\_\+const()}
{\footnotesize\ttfamily const \textbf{ ec\+\_\+eoe\+\_\+t}$\ast$ ec\+\_\+master\+\_\+get\+\_\+eoe\+\_\+handler\+\_\+const (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{uint16\+\_\+t}]{index }\end{DoxyParamCaption})}



Get an EoE handler via its position in the list. 

Const version.

\begin{DoxyReturn}{Returns}
EoE handler pointer, or {\itshape N\+U\+LL} if not found. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em index} & EoE handler index. \\
\hline
\end{DoxyParams}


Definition at line 1974 of file master.\+c.

\mbox{\label{master_8c_a9536093761b5644505db208de1ff6f3d}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+debug\+\_\+level@{ec\+\_\+master\+\_\+debug\+\_\+level}}
\index{ec\+\_\+master\+\_\+debug\+\_\+level@{ec\+\_\+master\+\_\+debug\+\_\+level}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+debug\+\_\+level()}
{\footnotesize\ttfamily int ec\+\_\+master\+\_\+debug\+\_\+level (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{unsigned int}]{level }\end{DoxyParamCaption})}



Set the debug level. 


\begin{DoxyRetVals}{Return values}
{\em 0} & Success. \\
\hline
{\em -\/\+E\+I\+N\+V\+AL} & Invalid debug level. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em level} & Debug level. May be 0, 1 or 2. \\
\hline
\end{DoxyParams}


Definition at line 1999 of file master.\+c.

\mbox{\label{master_8c_a185dec218540303a0d13432003226c24}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+calc\+\_\+topology\+\_\+rec@{ec\+\_\+master\+\_\+calc\+\_\+topology\+\_\+rec}}
\index{ec\+\_\+master\+\_\+calc\+\_\+topology\+\_\+rec@{ec\+\_\+master\+\_\+calc\+\_\+topology\+\_\+rec}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+calc\+\_\+topology\+\_\+rec()}
{\footnotesize\ttfamily int ec\+\_\+master\+\_\+calc\+\_\+topology\+\_\+rec (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master,  }\item[{\textbf{ ec\+\_\+slave\+\_\+t} $\ast$}]{port0\+\_\+slave,  }\item[{unsigned int $\ast$}]{slave\+\_\+position }\end{DoxyParamCaption})}



Calculates the bus topology; recursion function. 

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
{\em port0\+\_\+slave} & Slave at port 0. \\
\hline
{\em slave\+\_\+position} & Slave position. \\
\hline
\end{DoxyParams}


Definition at line 2084 of file master.\+c.

\mbox{\label{master_8c_a3efc174486826b61475631bb8f174921}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+calc\+\_\+topology@{ec\+\_\+master\+\_\+calc\+\_\+topology}}
\index{ec\+\_\+master\+\_\+calc\+\_\+topology@{ec\+\_\+master\+\_\+calc\+\_\+topology}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+calc\+\_\+topology()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+calc\+\_\+topology (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Calculates the bus topology. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 2127 of file master.\+c.

\mbox{\label{master_8c_aaad29114739c2b893d0213da1077a1e5}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+calc\+\_\+transmission\+\_\+delays@{ec\+\_\+master\+\_\+calc\+\_\+transmission\+\_\+delays}}
\index{ec\+\_\+master\+\_\+calc\+\_\+transmission\+\_\+delays@{ec\+\_\+master\+\_\+calc\+\_\+transmission\+\_\+delays}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+calc\+\_\+transmission\+\_\+delays()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+calc\+\_\+transmission\+\_\+delays (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Calculates the bus transmission delays. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 2144 of file master.\+c.

\mbox{\label{master_8c_aafd73ba61769411a24cbd11aa2e6eff0}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+calc\+\_\+dc@{ec\+\_\+master\+\_\+calc\+\_\+dc}}
\index{ec\+\_\+master\+\_\+calc\+\_\+dc@{ec\+\_\+master\+\_\+calc\+\_\+dc}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+calc\+\_\+dc()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+calc\+\_\+dc (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Distributed-\/clocks calculations. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 2166 of file master.\+c.

\mbox{\label{master_8c_a0511f992dad4de50b21d3bb02c7ef3d9}} 
\index{master.\+c@{master.\+c}!ec\+\_\+master\+\_\+request\+\_\+op@{ec\+\_\+master\+\_\+request\+\_\+op}}
\index{ec\+\_\+master\+\_\+request\+\_\+op@{ec\+\_\+master\+\_\+request\+\_\+op}!master.\+c@{master.\+c}}
\subsubsection{ec\+\_\+master\+\_\+request\+\_\+op()}
{\footnotesize\ttfamily void ec\+\_\+master\+\_\+request\+\_\+op (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Request OP state for configured slaves. 


\begin{DoxyParams}{Parameters}
{\em master} & Ether\+C\+AT master. \\
\hline
\end{DoxyParams}


Definition at line 2183 of file master.\+c.

\mbox{\label{master_8c_aa1f4eb5317fbcaa6f25ff49199beede6}} 
\index{master.\+c@{master.\+c}!ecrt\+\_\+master\+\_\+create\+\_\+domain\+\_\+err@{ecrt\+\_\+master\+\_\+create\+\_\+domain\+\_\+err}}
\index{ecrt\+\_\+master\+\_\+create\+\_\+domain\+\_\+err@{ecrt\+\_\+master\+\_\+create\+\_\+domain\+\_\+err}!master.\+c@{master.\+c}}
\subsubsection{ecrt\+\_\+master\+\_\+create\+\_\+domain\+\_\+err()}
{\footnotesize\ttfamily \textbf{ ec\+\_\+domain\+\_\+t}$\ast$ ecrt\+\_\+master\+\_\+create\+\_\+domain\+\_\+err (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+master\+\_\+t} $\ast$}]{master }\end{DoxyParamCaption})}



Same as \doxyref{ecrt\+\_\+master\+\_\+create\+\_\+domain()}{p.}{group__ApplicationInterface_gae4ede07f05b211667078ab2b2396da6e}, but with E\+R\+R\+\_\+\+P\+T\+R() return value. 

\begin{DoxyReturn}{Returns}
New domain, or E\+R\+R\+\_\+\+P\+T\+R() return value. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em master} & master \\
\hline
\end{DoxyParams}


Definition at line 2217 of file master.\+c.



\subsection{Variable Documentation}
\mbox{\label{master_8c_a07848f103b98208d90a6fec920790500}} 
\index{master.\+c@{master.\+c}!rate\+\_\+intervals@{rate\+\_\+intervals}}
\index{rate\+\_\+intervals@{rate\+\_\+intervals}!master.\+c@{master.\+c}}
\subsubsection{rate\+\_\+intervals}
{\footnotesize\ttfamily const unsigned int rate\+\_\+intervals[$\,$]}

{\bfseries Initial value\+:}
\begin{DoxyCode}
= \{
    1, 10, 60
\}
\end{DoxyCode}


List of intervals for statistics [s]. 



Definition at line 87 of file master.\+c.

